import java.util.*;

public class test_24_08_20 {
    public static void main(String[] args) {
        Scanner sr = new Scanner(System.in);
        //int n = sr.nextInt();
        int n = 5;
        int[][] arr = new int[n][n];
        ArrayList<Integer> r = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            for (int j = 0; j <= i; j++) {
                arr[i][j] = 1;
            }
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                //if(arr[i][j] != 0)
                System.out.print(arr[i][j]);
            }
            System.out.println();
        }
    }

    class Solution01 {
        public int arrayPairSum(int[] nums) {
            int right = 1, left = 0;
            Arrays.sort(nums);//升序排列
            int sum = 0;
            for (int i = 0; i < nums.length; i += 2) {
                sum += nums[i];
            }
            return sum;
        }
    }

    class Solution02 {
        public int[] twoSum(int[] numbers, int target) {
            HashMap<Integer, Integer> hash = new HashMap<Integer, Integer>();
            for (int i = 0; i < numbers.length; i++) {
                int value = target - numbers[i];
                if (hash.containsKey(numbers[i]))
                    return new int[]{hash.get(numbers[i]), i + 1};
                hash.put(value, i + 1);//1-2
            }
            return new int[]{};
        }
    }

    class Solution03 {
        public int findMaxConsecutiveOnes(int[] nums) {
            int ans = 0;
            int temp = 0;
            for (int i = 0; i < nums.length; i++) {
                if (nums[i] == 1) {
                    temp++;
                } else {
                    ans = Math.max(ans, temp);
                    temp = 0;
                }
            }
            return Math.max(ans, temp);
        }
    }

    class Solution04 {
        public List<List<Integer>> generate(int numRows) {
            List<List<Integer>> ans = new ArrayList<>();
            for (int i = 0; i < numRows; i++) {
                List<Integer> list = new ArrayList<>();
                for (int j = 0; j <= i; j++) {
                    if (j == 0 || i == j)
                        list.add(1);
                    else {
                        list.add(ans.get(i - 1).get(j - 1) + ans.get(i - 1).get(j));         ///?
                    }
                }
                ans.add(list);
            }
            return ans;
        }
    }

    class Solution05 {
        public List<Integer> getRow(int rowIndex) {
            List<Integer> list = new ArrayList<>(rowIndex + 1);
            for (int i = 0; i < rowIndex + 1; i++) {
                list.add(1);
            }
            for (int i = 1; i < rowIndex; i++) {
                for (int j = i; j > 0; j--) {
                    list.set(j, list.get(j) + list.get(j - 1));
                }
            }
            return list;
        }
    }

    class Solution06 {
        public String reverseWords(String s) {
            Stack<String> stack = new Stack<>();
            String[] strings = s.split(" ");
            String ans = "";
            StringBuilder sb = new StringBuilder(ans);
            int len = strings.length;
            for (int i = 0; i < len; i++) {
                sb.append(new StringBuilder(strings[i]).reverse().toString());
                if (i != len - 1) {
                    sb.append(" ");
                }
            }
            return sb.toString();
        }
    }

    class MyLinkedList {

        int size;
        ListNode head;

        class ListNode {
            int val;
            ListNode next;
            public ListNode(int val) {
                this.val = val;
            }
        }

        public MyLinkedList() {
            size = 0;
            head = new ListNode(0); // 虚拟头节点
        }

        public int get(int index) {
            if (index < 0 || index >= size) {
                return -1;
            }
            ListNode node = head.next; // 从头节点的下一个节点开始
            for (int i = 0; i < index; i++) {
                node = node.next;
            }
            return node.val;
        }

        public void addAtHead(int val) {
            addAtIndex(0, val);
        }

        public void addAtTail(int val) {
            addAtIndex(size, val);
        }

        public void addAtIndex(int index, int val) {
            if (index > size) {
                return;
            }
            ListNode node = head;
            ListNode newnode = new ListNode(val);
            for (int i = 0; i < index; i++) {
                node = node.next;
            }
            newnode.next = node.next;
            node.next = newnode;
            size++;
        }

        public void deleteAtIndex(int index) {
            if (index < 0 || index >= size) {
                return;
            }
            ListNode node = head;
            for (int i = 0; i < index; i++) {
                node = node.next;
            }
            node.next = node.next.next;
            size--;
        }
    }


}
